const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  publicPath: "/",
  outputDir: "dist",
  assetsDir: "static",
  indexPath: "index.html",
  filenameHashing: true,
  lintOnSave: false,
  runtimeCompiler: false,
  productionSourceMap: false,
  parallel: require("os").cpus().length > 1,
  chainWebpack: config => {
    config.module
      .rule('js')
      .test(/\.js$/)
      .use('babel-loader')
      .loader('babel-loader')
      .options({
        presets: ['@babel/preset-env']
      })
      .end()
  },
  devServer: {
    host: "0.0.0.0",
    port: 8083,
    headers: {
      "Access-Control-Allow-Origin": "*",
    },
  }
})
